package leetcode;


import cn.hutool.core.date.DateUtil;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;

/**
 * create by duanx 2022/2/7
 *
 * @classname: Test3
 * @author: duanx
 * @date: 2022/2/7 9:22
 **/
public class Test11 {

    public static void main(String[] args) {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String str;
        try {
            while (!(str = reader.readLine()).isEmpty()) {
                int n = Integer.parseInt(str);
                StringBuilder sb = new StringBuilder();
                while (true){
                    int y = n%2;
                    int x = n/2;
                    sb.insert(0,y);
                    if (x==0){
                        break;
                    }
                    if (x==1){
                        sb.insert(0,x);
                        break;
                    }
                    n=x;
                }
                int count = 0;
                for (int i=0;i<sb.length();i++){
                    if (sb.charAt(i)=='1'){
                        count++;
                    }
                }
                System.out.println(sb);
            }
        } catch (Exception e) {
            System.out.println(e.getMessage());
        }

    }


}
